#include "AddDialog.h"
#include "ui_AddDialog.h"

AddDialog::AddDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AddDialog)
{
    ui->setupUi(this);
}
//--------------------------------------------------------------------------------
AddDialog::~AddDialog()
{
    delete ui;
}
//--------------------------------------------------------------------------------
AddDialogData AddDialog::getData()
{
    return AddDialogData(ui->comboBox->currentIndex(),
                         ui->lineEdit->text(),
                         0);
}
//--------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
// class AddDialogData
//--------------------------------------------------------------------------------
AddDialogData::AddDialogData(int type, QString title, float id):
    _type(type),
    _title(title),
    _id(id)
{
}

//--------------------------------------------------------------------------------
int AddDialogData::getType()
{
    return _type;
}

//--------------------------------------------------------------------------------
QString AddDialogData::getTitle()
{
    return _title;
}

//--------------------------------------------------------------------------------
float AddDialogData::getId()
{
    return _id;
}
